package com.codeforces.contest.c298;

import java.util.Scanner;


public class _298C {

	static Scanner scanner = new Scanner(System.in);
	static String a, b;
	static int la, lb, no, par, k1, k2;

	public static void main(String[] args) {
		a = scanner.nextLine();
		b = scanner.nextLine();
		la = a.length();
		lb = b.length();
		k1 = k2 = 0;
		for(int i=0;i<la;++i) {
			k1+=a.charAt(i)-'0';
		}
		for(int i=0;i<lb;++i) {
			k2+=b.charAt(i)-'0';
		}
		if (k1%2==1) {
			++k1;
		}
		if (k1<k2) {
			System.out.println("NO");
		}
		else {
			System.out.println("YES");	
		}
	}

}